package com.shopAuth.dao;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.shopAuth.bean.AppSession;

@Mapper
public interface AppSessionMapper {

	@Select("select * from sys_appSession where token=#{token}")
	public AppSession getByToken(String token);
	@Insert("insert into sys_appSession set userId=#{userId},createDate=#{createDate},loginDate=#{loginDate},loginIp=#{loginIp},uuid=#{uuid},token=#{token},status=#{status}")
	public int insert(AppSession appSession);
	@Select("select * from sys_appSession where userId=#{userId} order by createDate desc limit 0,1")
	public AppSession getByUserId(String userId);
	
}
